package com.olinsports.system.olinsportssystem.controller;

import com.olinsports.system.olinsportssystem.manager.StmUsrManager;
import com.olinsports.system.olinsportssystem.model.StmUsr;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by Administrator on 2017/8/5.
 */
@Controller
@RequestMapping("stmUsr")
public class StmUsrController {
    @Autowired
    private StmUsrManager stmUsrManager;

    @RequestMapping("/selectAll")
    @ResponseBody
    public List<StmUsr> selectAll(){
        return stmUsrManager.selectAll();
    }

    @RequestMapping("/insertAll")
    @ResponseBody
    public int insertAll(@RequestBody StmUsr stmUsr){
        System.out.println("stmUsr = "+stmUsr);
        return stmUsrManager.insertAll(stmUsr);
    }



}
